* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  &:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      45deg,
      #e91e63,
      #e91e63 50%,
      #ffc170,
      #ffc170 50%
    );
  }
  &:after {
    @extend :before;
    top: -10px;
    background: linear-gradient(
      160deg,
      #03a9f4,
      #03a9f4 50%,
      transparent,
      transparent 50%
    );
    animation: animate 5s linear infinite;
  }
}
// 背景和时钟移动动画
@keyframes animate {
  0%,
  100% {
    transform: translateY(10px);
  }
  50% {
    transform: translateY(-10px);
  }
}
.container {
  position: relative;
  // 这里用伪元素为了方便定位,简化页面的html标签
  // 时钟投影
  &::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 60px;
    background: radial-gradient(rgba(0, 0, 0, 0.4), transparent, transparent);
    bottom: -150px;
    border-radius: 50%;
    animation: shadow 5s linear infinite;
    animation-delay: -2.5s;
  }
}
// 时钟投影效果
@keyframes shadow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.box {
  position: relative;
  // 设置z-index 防止::after样式遮挡
  z-index: 1;
  width: 400px;
  height: 400px;
  backdrop-filter: blur(25px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: animate 5s linear infinite;
  animation-delay: -2.5s;
}
.click {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(transparent, rgba(255, 255, 255, 0.2)),
    url("../assets/clock.png");
  background-size: cover;
  border-radius: 50%;
  // 这里的模糊似乎无明显效果
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  // 取消下边框和右边框的显示 作用:设计-美化
  border-right: none;
  border-bottom: none;
  box-shadow: -10px -10px 20px rgba(255, 255, 255, 0.1),
    10px 10px 20px rgba(0, 0, 0, 0.2), 0px 40px 50px rgba(0, 0, 0, 0.2);
  &::before {
    position: absolute;
    content: "";
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: white;
    // 时钟圆点置顶效果
    z-index: 1111;
  }
}

.hour,
.min,
.sec {
  position: absolute;
}
.hour,
.hr {
  width: 160px;
  height: 160px;
}
.min,
.mn {
  width: 190px;
  height: 190px;
}
.sec,
.sc {
  width: 230px;
  height: 230px;
}

.hr,
.mn,
.sc {
  display: flex;
  justify-content: center;
  position: absolute;
  border-radius: 50%;
}
.hr:before {
  position: absolute;
  content: "";
  width: 8px;
  height: 80px;
  background-color: red;
  border-radius: 6px;
  z-index: 11;
}
.mn:before {
  @extend .hr:before;
  width: 4px;
  height: 90px;
  background-color: white;
  z-index: 12;
}
.sc:before {
  @extend .hr:before;
  width: 2px;
  height: 150px;
  background-color: white;
}
